import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    backInfo: {
      count: 10,
      zhoujing: ''
    }
  },
  mutations: {
    AddUsername (state, user) {
      state.backInfo.count++
      state.backInfo.zhoujing = user.zhoujing
    }
  },
  actions: {
    AddUsername ({ commit, state }, user) {
      commit('AddUsername', user)
    }
  },
  modules: {}
})
